package com.ruoyi.system.domain;


import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * @author renzhihao
 * @date 2023/11/24 18:15
 */
public class SysKeystore extends BaseEntity {

    private Long keystoreId;

    /**
     * 密钥算法，目前支持RSA
     */
    @NotBlank(message = "算法不能为空")
    @Size(min = 0, max = 50, message = "算法长度不能超过50个字符")
    private String alg;

    /**
     * 别名
     */
    @NotBlank(message = "别名不能为空")
    @Size(min = 0, max = 50, message = "别名长度不能超过50个字符")
    private String alias;

    /**
     * 名称
     */
    @NotBlank(message = "keystore名称不能为空")
    @Size(min = 0, max = 50, message = "keystore名称长度不能超过50个字符")
    private String keystoreName;

    private Integer initial;

    /**
     * 名字与姓氏
     */
    private String cn;

    /**
     * 组织单位名称
     */
    private String ou;

    /**
     * 组织名称
     */
    private String o;

    /**
     * 城市或区域名称
     */
    private String l;

    /**
     * 省/市/自治区名称
     */
    private String st;

    /**
     * 国家/地区代码
     */
    private String c;

    @NotBlank(message = "keystorePassword不能为空")
    @Size(min = 0, max = 200, message = "keystorePassword名称长度不能超过200个字符")
    private String keystorePass;

    @NotBlank(message = "privateKeyPassword不能为空")
    @Size(min = 0, max = 200, message = "privateKeyPassword长度不能超过200个字符")
    private String privateKeyPass;

    private String fileName;

    private String fileUrl;

    private Long sort;

    public Long getKeystoreId() {
        return keystoreId;
    }

    public void setKeystoreId(Long keystoreId) {
        this.keystoreId = keystoreId;
    }

    public String getAlg() {
        return alg;
    }

    public void setAlg(String alg) {
        this.alg = alg;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public String getKeystoreName() {
        return keystoreName;
    }

    public void setKeystoreName(String keystoreName) {
        this.keystoreName = keystoreName;
    }

    public Integer getInitial() {
        return initial;
    }

    public void setInitial(Integer initial) {
        this.initial = initial;
    }

    public String getCn() {
        return cn;
    }

    public void setCn(String cn) {
        this.cn = cn;
    }

    public String getOu() {
        return ou;
    }

    public void setOu(String ou) {
        this.ou = ou;
    }

    public String getO() {
        return o;
    }

    public void setO(String o) {
        this.o = o;
    }

    public String getL() {
        return l;
    }

    public void setL(String l) {
        this.l = l;
    }

    public String getSt() {
        return st;
    }

    public void setSt(String st) {
        this.st = st;
    }

    public String getC() {
        return c;
    }

    public void setC(String c) {
        this.c = c;
    }

    public String getKeystorePass() {
        return keystorePass;
    }

    public void setKeystorePass(String keystorePass) {
        this.keystorePass = keystorePass;
    }

    public String getPrivateKeyPass() {
        return privateKeyPass;
    }

    public void setPrivateKeyPass(String privateKeyPass) {
        this.privateKeyPass = privateKeyPass;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFileUrl() {
        return fileUrl;
    }

    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }

    public Long getSort() {
        return sort;
    }

    public void setSort(Long sort) {
        this.sort = sort;
    }

    @Override
    public String toString() {
        return "Keystore{" +
                "keystoreId=" + keystoreId +
                ", alg='" + alg + '\'' +
                ", alias='" + alias + '\'' +
                ", keystoreName='" + keystoreName + '\'' +
                ", initial=" + initial +
                ", cn='" + cn + '\'' +
                ", ou='" + ou + '\'' +
                ", o='" + o + '\'' +
                ", l='" + l + '\'' +
                ", st='" + st + '\'' +
                ", c='" + c + '\'' +
                ", keystorePass='" + keystorePass + '\'' +
                ", privateKeyPass='" + privateKeyPass + '\'' +
                ", fileName='" + fileName + '\'' +
                ", fileUrl='" + fileUrl + '\'' +
                ", sort=" + sort +
                '}';
    }
}
